package com.ruoyi.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.domain.CourseVideo;
import com.ruoyi.service.CourseVideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/course/video")
public class CourseVideoController {

    @Autowired
    private CourseVideoService courseVideoService;

    @PostMapping("/add")
    public AjaxResult add(@RequestBody CourseVideo courseVideo) {
        return AjaxResult.success(courseVideoService.insertCourseVideo(courseVideo));
    }
}

